﻿CREATE TABLE [dbo].[CarteMuncaIstoric] (
    [IDCarteMunca] INT      IDENTITY (1, 1) NOT NULL,
    [IDPersoana]   INT      NOT NULL,
    [DeLaData]     DATETIME NOT NULL,
    [PanaLaData]   DATETIME NULL,
    [Prezent]      BIT      DEFAULT ((0)) NOT NULL,
    [IDAngajator]  INT      NOT NULL,
    CONSTRAINT [PK_CarteMuncaIstoric] PRIMARY KEY CLUSTERED ([IDCarteMunca] ASC),
    CONSTRAINT [FK_CarteMuncaIstoric_CarteMuncaAngajator] FOREIGN KEY ([IDAngajator]) REFERENCES [dbo].[CarteMuncaAngajator] ([IDAngajator]),
    CONSTRAINT [FK_CarteMuncaIstoric_Persoane] FOREIGN KEY ([IDPersoana]) REFERENCES [dbo].[Persoane] ([IdPersoana])
);

